import requests
from loguru import logger
cookies = {
    '__jda': '122270672.16973442750411184399777.1697344275.1697344275.1697344275.1',
    '__jdc': '122270672',
    '__jdv': '122270672|direct|-|none|-|1697344275041',
    '__jdu': '16973442750411184399777',
    'wlfstk_smdl': 'onq4npgajg8uduhpussao4hummlihjt6',
    'TrackID': '1spa44MBRfd5bZuBVkRN4Rn7t9PdYLEP_k2jAotXG19ttIeisep0v_QnNxlfi9wn73VDSpsplKodsDR5MQ-AfGO3nvtCiHB8_NZBn9QskT2HzaW6eH4BuszjiLLVzl_OrSikoPazaykcXWiB0Lel8OA',
    'thor': '0ED7550A41350667BAC532624B552959E42670A5884747576CB4D7B0ACCB72BA138A3CA61659F46C80669D86840C9C7FA6D806DA5BFEDDE1A68E3577D33044043D8F0CD1E97DA501FA36B7926BCB993E4666A4A7C3B0E64E892E1A80EE1E3DB8581E64573E034EFB566F4CD22894FEA24AEEF0593A669A652609CBBB8EF3E53AE767B27895ACD834218FBA776A36E416EE1BD83ABD43959C389AB4630B0825EF',
    'flash': '2_b4wRtnFc9629sQPC0kCBnfVyrAloxVdat8JIc3iTb1jcgWMc-RoLctfsiCqnfR74LCORjTFyiCiQLqWGCMbg9RTGv7magwLMlXmA0h91IgV*',
    'pinId': 'LOGctDCUn83M5bmVVG2RtrV9-x-f3wj7',
    'pin': 'jd_495abd7913026',
    'unick': '%E9%A3%8E%E8%BD%BB%E4%BA%91%E6%B7%A1%E4%B9%8B%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88',
    'ceshi3.com': '201',
    '_tp': 'DC2IOkmrehlAh%2BLpNwE5fLWMcqn4JTMkeNEmd5D9KQ8%3D',
    '_pst': 'jd_495abd7913026',
    'areaId': '2',
    'ipLoc-djd': '2-2815-0-0',
    '3AB9D23F7A4B3C9B': 'BEHS47E65GWTC7MWSX2R66GVIYAW2LJHA5VZJQCACAR4IFUY2IJT5ERWU6WGPJ2DAEPIPF3FVMOM7XMSMBB7JD7XBA',
    '__jdb': '122270672.3.16973442750411184399777|1.1697344275',
    '3AB9D23F7A4B3CSS': 'jdd03BEHS47E65GWTC7MWSX2R66GVIYAW2LJHA5VZJQCACAR4IFUY2IJT5ERWU6WGPJ2DAEPIPF3FVMOM7XMSMBB7JD7XBAAAAAMLGGQOTEQAAAAACMEH3NHHCMMKT4X',
    '_gia_d': '1',
}

headers = {
    'authority': 'api.m.jd.com',
    'accept': 'application/json, text/javascript, */*; q=0.01',
    'accept-language': 'en-US,en;q=0.9',
    'content-type': 'application/x-www-form-urlencoded',
    # 'cookie': '__jda=122270672.16973442750411184399777.1697344275.1697344275.1697344275.1; __jdc=122270672; __jdv=122270672|direct|-|none|-|1697344275041; __jdu=16973442750411184399777; wlfstk_smdl=onq4npgajg8uduhpussao4hummlihjt6; TrackID=1spa44MBRfd5bZuBVkRN4Rn7t9PdYLEP_k2jAotXG19ttIeisep0v_QnNxlfi9wn73VDSpsplKodsDR5MQ-AfGO3nvtCiHB8_NZBn9QskT2HzaW6eH4BuszjiLLVzl_OrSikoPazaykcXWiB0Lel8OA; thor=0ED7550A41350667BAC532624B552959E42670A5884747576CB4D7B0ACCB72BA138A3CA61659F46C80669D86840C9C7FA6D806DA5BFEDDE1A68E3577D33044043D8F0CD1E97DA501FA36B7926BCB993E4666A4A7C3B0E64E892E1A80EE1E3DB8581E64573E034EFB566F4CD22894FEA24AEEF0593A669A652609CBBB8EF3E53AE767B27895ACD834218FBA776A36E416EE1BD83ABD43959C389AB4630B0825EF; flash=2_b4wRtnFc9629sQPC0kCBnfVyrAloxVdat8JIc3iTb1jcgWMc-RoLctfsiCqnfR74LCORjTFyiCiQLqWGCMbg9RTGv7magwLMlXmA0h91IgV*; pinId=LOGctDCUn83M5bmVVG2RtrV9-x-f3wj7; pin=jd_495abd7913026; unick=%E9%A3%8E%E8%BD%BB%E4%BA%91%E6%B7%A1%E4%B9%8B%E7%A7%A6%E6%97%B6%E6%98%8E%E6%9C%88; ceshi3.com=201; _tp=DC2IOkmrehlAh%2BLpNwE5fLWMcqn4JTMkeNEmd5D9KQ8%3D; _pst=jd_495abd7913026; areaId=2; ipLoc-djd=2-2815-0-0; 3AB9D23F7A4B3C9B=BEHS47E65GWTC7MWSX2R66GVIYAW2LJHA5VZJQCACAR4IFUY2IJT5ERWU6WGPJ2DAEPIPF3FVMOM7XMSMBB7JD7XBA; __jdb=122270672.3.16973442750411184399777|1.1697344275; 3AB9D23F7A4B3CSS=jdd03BEHS47E65GWTC7MWSX2R66GVIYAW2LJHA5VZJQCACAR4IFUY2IJT5ERWU6WGPJ2DAEPIPF3FVMOM7XMSMBB7JD7XBAAAAAMLGGQOTEQAAAAACMEH3NHHCMMKT4X; _gia_d=1',
    'origin': 'https://pcsitepp-fm.jd.com',
    'referer': 'https://pcsitepp-fm.jd.com/',
    'sec-ch-ua': '"Chromium";v="104", " Not A;Brand";v="99", "Microsoft Edge";v="104"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Linux"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-site',
    'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.81 Safari/537.36 Edg/104.0.1293.47',
    'x-referer-page': 'https://pcsitepp-fm.jd.com/',
    'x-rp-client': 'h5_1.0.0',
}

params = {
    'appid': 'siteppPc',
    'functionId': 'siteppPC_orderProtectApply',
    'loginType': '3',
    't': '1697344730826',
    'x-api-eid-token': 'jdd03BEHS47E65GWTC7MWSX2R66GVIYAW2LJHA5VZJQCACAR4IFUY2IJT5ERWU6WGPJ2DAEPIPF3FVMOM7XMSMBB7JD7XBAAAAAMLGGQOTEQAAAAACMEH3NHHCMMKT4X',
}

data = {
    'body': '{"orderId":276910706483,"skuIds":["J_68589324423"]}',
    'h5st': '20231015123850838;3i9gn5zzz5tt6td9;f4e00;tk03w95151cbb18nq0FZsC1rks3hPYI5HmKTD5L4BFG5Hy7uEr_mHnUTtIEbWfZkFbyr4jt2rPsGNfdfSUMwwrb9Ewxu;b548656baa9e619268c54073b30ecba4;4.1;1697344730838;a5a451073019f591a2fa7efc11ebfb49bb973f3e02a783a413aec00b9f1440df41eb4f49b57d87edfc315105f23d97739e7fc715d779f941447f2e4b51271ede2de462288cd2692416844c63c97881dcfc8d9b1de801a78d968e3aabd74424a82eda3abf62e13d7ebbdbe579cbdc213c042f499196ab602839a4987cd2bb2faa9b652d2bd25b0b2e527588a85eb8df688ee2872e231a8008ff7d3985f118f974f910386f1748ff750a826df2a9c0cf6ba57ca5a798698aee07a1c6d5be1645af8c0ea7c09bf7630200478375a64a427c997c75dda6f40cf16a6183cfc5325a40f3dcce8241dd52ac93fe7481156f13117a61e7c68bf1e65575cb9d2b23e566fb83b6f4043df226b06df002e55012c2ec',
}

response = requests.post('https://api.m.jd.com/api', params=params, cookies=cookies, headers=headers, data=data)
logger.info(response.json())